<?php
class forms_LoginForm extends Zend_Form {

    public function  __construct($options = null) {

        parent::__construct($options);

        $this->setAction('/user/login')
            ->setMethod('post')
            ->setAttrib('name','login')
            ->setAttrib('id','login');

            $username = new Zend_Form_Element_Text('username');
            $username->addValidator(new Zend_Validate_Alnum())
            ->setRequired('true')
            ->addFilter('StringtoLower')
            ->setLabel('username');
            $password = new Zend_Form_Element_Password('password');
            $password->setRequired('true')
            ->setLabel('password');

            $this->addElements(array($username,$password));

    }

}